package office.dao.business;

import java.util.Iterator;
import java.util.Map;

import platform.common.dao.impl.BaseDomainProviderImpl;

public class BidProductDetailDP extends BaseDomainProviderImpl{
	
	//方法描述: 根据项目名称获取标书信息
	public String findBidProductDetailByIdAndName(Map condMap){
		StringBuffer strBuf = new StringBuffer();
		strBuf.append(" from "+ this.getDomainClassName() + " where 1=1 ");
		Iterator it = condMap.keySet().iterator();
		while(it.hasNext()){
			String str = (String)it.next();
			if(str.equals("productName")){
				strBuf.append(" and productName like '%"+condMap.get(str)+"%' ");
			}
		}
		return strBuf.toString();
	}
	
	//方法描述: 根据标书的ID获取标书对应的产品明细
	public String findBidProductDetailByBidBookId(Map condMap){
		StringBuffer strBuf = new StringBuffer();
		strBuf.append(" from "+ this.getDomainClassName() + " where 1=1 ");
		Iterator it = condMap.keySet().iterator();
		while(it.hasNext()){
			String str = (String)it.next();
			if(str.equals("bidBookId")){
				strBuf.append(" and bidBookId = '"+condMap.get(str)+"' ");
			}
		}
		return strBuf.toString();
	}
}
